<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:a4j="http://richfaces.org/a4j"
	xmlns:rich="http://richfaces.org/rich">
	<f:view encoding="UTF-8" contentType="text/html" locale="en_US">
		<h:head>
	<meta http-equiv="X-UA-Compatible" content="IE=8" />
	<title>${msg['templates.template.header.nombreSistema']}</title>
			<!--meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /-->
			<h:outputScript library="org.richfaces" name="jquery.js"/>
			<h:outputScript library="js" name="sijypUtils.js" />
			<h:outputScript library="js" name="jquery.numeric.js" />
			<h:outputScript library="js" name="jquery.jqEasyCharCounter.js" />
			<link rel="shortcut icon" href="#{resource['images:favicon.ico']}" type="image/x-icon"/>

	<script type="text/javascript">
		$(document).ready(function() {
			addTextAreaCounterByClass();
			$('input[type="text"]').change(function() {
				$(this).val($.trim($(this).val().toUpperCase()));
				$(this).val(normalize($(this).val()));
				});
			
				$('textarea').change(function(){
				     $(this).val($.trim($(this).val().toUpperCase()));
				});
				$(this).val(normalize($(this).val()));
				

		});
		
	</script>
		</h:head>

		<h:body>
	<h:panelGrid width="100%">
		<h:panelGrid columns="2" columnClasses="headerLeft, headerRight"
			width="100%">
			<h:panelGrid columns="2" columnClasses="logo_place_2,text_place">
				<h:graphicImage value="/resources/images/LogotipoFGN.jpg" width="40"
					height="50" />
				<h:panelGrid>
					<h1>${msg['templates.template.header.sigla']}</h1>
					<h2>${msg['templates.template.header.nombreSistema']}</h2>
				</h:panelGrid>
			</h:panelGrid>

			<h:panelGrid
				rendered="#{request.userPrincipal != null and request.userPrincipal.name != 'anonymous'}">
				<h:form>
					<h:panelGrid columns="3">
						<h:panelGrid columns="2">
							<h:graphicImage value="/resources/images/icons/ico_home.png" />
							<h:commandLink value="${msg['templates.template.header.inicio']}"
								action="home" />
						</h:panelGrid>
						<h:panelGrid columns="2">
							<h:graphicImage value="/resources/images/icons/ico_exit.png" />
							<h:commandLink value="${msg['templates.template.header.salir']}">
								<f:param name="GLO" value="true" />
							</h:commandLink>
						</h:panelGrid>
						<ui:remove>
							<h:panelGrid columns="2">
								<h:graphicImage value="/resources/images/icons/ico_password.png" />
								<h:commandLink
									value="${msg['templates.template.header.cambiarContrasena']}" />
							</h:panelGrid>
						</ui:remove>
						<h:outputText value="#{applicationBean.currentDate}">
							<f:convertDateTime pattern="dd/MM/yyyy" type="date" />
						</h:outputText>
					</h:panelGrid>
					<h:outputLabel value="${msg['templates.template.header.entidad']}" />
					<h:outputLabel value="#{request.userPrincipal.name}" />
				</h:form>
			</h:panelGrid>
		</h:panelGrid>
		<h:panelGrid columns="2" width="100%"
			columnClasses="menuContainer, bodyContainer"
			rendered="#{request.userPrincipal != null and request.userPrincipal.name != 'anonymous'}">
			<h:panelGrid id="menuContainer" width="100%" styleClass="menuList">
				<h:form>
					<rich:panelMenu expandSingle="false" width="100%"
						groupCollapsedRightIcon="triangleDown"
						groupExpandedRightIcon="triangleUp">
						<rich:panelMenuGroup oncomplete="#{component}.expandAll()" id="menuBienes" rendered="#{menuBean.componentesHabilitados.containsKey('menuBienes')}" 
							expanded="true" label="${msg['templates.template.menu.bienes']}"> 
							<rich:panelMenuItem action="#{menuBean.registrarBien}" rendered="#{menuBean.componentesHabilitados.containsKey('registrarBien')}"
								mode="server"
								label="${msg['templates.template.menu.bienes.registroBienes']}"
								id="registrarBien"/>
							<ui:remove>
							<rich:panelMenuGroup rendered="false"
								label="${msg['templates.template.menu.bienes.reportes']}"
								 id="reportesBien">
								
								<rich:panelMenuItem action="#{menuBean.irReportePorTipo}" 
									label="${msg['templates.template.menu.bienes.reportes.tipo']}"
									mode="server" 
									id="reportePorTipo"/>
								<rich:panelMenuItem rendered="false"
									action="#{reporteManager.prepararReporte('resumen_bienes_por_tipo')}"
									mode="server"
									label="${msg['templates.template.menu.bienes.reportes.resumen.tipo']}" 
									id="reporteResumenPorTipo"/>
								<rich:panelMenuItem rendered="false"
									action="#{menuBean.irReporteBienesRegistrados}"
									label="${msg['templates.template.menu.bienes.reportes.bienesRegistrados']}"
									mode="server" 
									id="bienesRegistrados"/>
							</rich:panelMenuGroup>
							<rich:panelMenuItem action="#{menuBean.entregasBien}"
								mode="server" rendered="false"
								label="${msg['templates.template.menu.entregaBien']}"
								id="entregaBien"/>
							</ui:remove>	
						</rich:panelMenuGroup>
						<rich:panelMenuGroup
								label="${msg['templates.template.menu.exhumaciones']}" 
								 expanded="true" rendered="#{menuBean.componentesHabilitados.containsKey('menuExhumaciones')}"
								 id="menuExhumaciones">
								
								<rich:panelMenuItem action="#{menuBean.irConsultaCaso}" 
									label="${msg['templates.template.menu.exhumaciones.consulta_caso']}"
									mode="server" rendered="#{menuBean.componentesHabilitados.containsKey('consultaCaso')}"
									id="consultaCaso"/>
								<rich:panelMenuItem action="#{menuBean.irConsultaDiligenciasProgramar}"
								label="${msg['templates.template.menu.exhumaciones.programar_diligencias']}"
								mode="server" rendered="#{menuBean.componentesHabilitados.containsKey('programarDiligencia')}"
								id="programarDiligencia"/>
								<rich:panelMenuItem action="#{menuBean.irConsultaAsignaciones}"
								label="${msg['templates.template.menu.exhumaciones.asignaciones']}"
								mode="server" rendered="#{menuBean.componentesHabilitados.containsKey('consultaAsignaciones')}"
								id="consultaAsignaciones"/>
								<rich:panelMenuItem action="#{menuBean.irCadaveresYresultados}"
								label="${msg['templates.template.menu.exhumaciones.cadaveres']}"
								mode="server" rendered="#{menuBean.componentesHabilitados.containsKey('cadaveresYresultados')}"
								id="cadaveresYresultados"/>
								<rich:panelMenuItem action="#{menuBean.irConsultaEntregas}"
								label="${msg['templates.template.menu.exhumaciones.entregas']}"
								mode="server" rendered="#{menuBean.componentesHabilitados.containsKey('consultaEntregas')}"
								id="consultaEntregas"/>
							</rich:panelMenuGroup>
							
						

						<rich:panelMenuGroup
								label="${msg['templates.template.menu.administracion']}"
								 expanded="true" rendered="#{menuBean.componentesHabilitados.containsKey('menuAdministracion')}"
								 id="menuAdministracion">
							<rich:panelMenuItem action="#{menuBean.configurarParamConfig}"
								label="#{msg['templates.template.menu.administracion.admin_catalogos']}"
								mode="server" rendered="#{menuBean.componentesHabilitados.containsKey('adminParametros')}" 
								id="adminParametros"/>

						

						</rich:panelMenuGroup>
						
					</rich:panelMenu>
				</h:form>
			</h:panelGrid>
			<h:panelGrid id="bodyContainer" width="100%">
				<rich:messages id="sijypMessages" globalOnly="true"
					styleClass="rf-msgs" errorClass="rf-msgs-err" />
				<a4j:status onstart="#{rich:component('loadingStatusModal')}.show()"
					onstop="#{rich:component('loadingStatusModal')}.hide(event); return false;" />
				<ui:insert name="body">Empty Body</ui:insert>
				<rich:popupPanel id="loadingStatusModal"  height="55" width="55"
					resizeable="false" modal="true">
					<h:graphicImage value="#{resource['images:ajax-loader.gif']}"
						alt="loading..." />
				</rich:popupPanel>
			</h:panelGrid>
		</h:panelGrid>
		<h:panelGrid id="loginContainer" width="100%"
			rendered="#{request.userPrincipal == null}">
			<h:messages globalOnly="true" />
			<ui:insert name="loginInsert">Not Logged In</ui:insert>
		</h:panelGrid>
		<br />
		<br />
		<h:panelGroup layout="block" style="text-align:center;"
			styleClass="footer">
			<h:panelGrid columns="3" style="margin: 0 auto;">
				<h:panelGrid columns="1">
					<h:graphicImage
						value="#{resource['images:icons/ico_escudo_ministerio_justicia.png']}" />
				</h:panelGrid>
				<h:panelGrid>
					<br />
					<h:outputText
						value="#{msg['templates.template.home.bottom.msg_l1']}" />
					<br />
					<h:outputText
						value="#{msg['templates.template.home.bottom.msg_l2']}" />
				</h:panelGrid>
				<h:graphicImage
					value="#{resource['images:icons/ico_justicia_transicional.png']}" />
			</h:panelGrid>


			<br />
			<h:outputText value="#{msg['templates.template.home.bottom.tamano_pantalla']}" />
			<br />
			<br />
			<h:outputLink value="http://www.mozilla.org/es-ES/">
				<h:graphicImage alt="Firefox 3.5+"
					value="/resources/images/fflogo.png" />
			</h:outputLink>
			<h:outputLink
				value="http://windows.microsoft.com/es-ES/internet-explorer/products/ie/home">
				<h:graphicImage alt="Internet Explorer 8.0+"
					value="/resources/images/ielogo.png" />
			</h:outputLink>
		</h:panelGroup>
	</h:panelGrid>
		</h:body>
		<h:outputStylesheet library="css" name="sijyp.css" />
	</f:view>
</html>
